home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / pmake / RCS / top.mk,v < prev    next >
Encoding:
Text File  |  1992-04-14  |  10.0 KB  |  635 lines

  1. head     1.22;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.22
  10. date     91.12.13.13.30.49;  author jhh;  state Exp;
  11. branches ;
  12. next     1.21;
  13.  
  14. 1.21
  15. date     91.09.24.17.47.09;  author jhh;  state Exp;
  16. branches ;
  17. next     1.20;
  18.  
  19. 1.20
  20. date     90.11.08.21.01.12;  author jhh;  state Exp;
  21. branches ;
  22. next     1.19;
  23.  
  24. 1.19
  25. date     90.07.30.15.42.47;  author rab;  state Exp;
  26. branches ;
  27. next     1.18;
  28.  
  29. 1.18
  30. date     90.03.08.16.51.14;  author douglis;  state Exp;
  31. branches ;
  32. next     1.17;
  33.  
  34. 1.17
  35. date     90.02.27.17.42.54;  author douglis;  state Exp;
  36. branches ;
  37. next     1.16;
  38.  
  39. 1.16
  40. date     89.10.09.06.55.28;  author rab;  state Exp;
  41. branches ;
  42. next     1.15;
  43.  
  44. 1.15
  45. date     89.04.03.22.23.15;  author douglis;  state Exp;
  46. branches ;
  47. next     1.14;
  48.  
  49. 1.14
  50. date     89.01.13.09.35.53;  author douglis;  state Exp;
  51. branches ;
  52. next     1.13;
  53.  
  54. 1.13
  55. date     89.01.09.22.33.34;  author douglis;  state Exp;
  56. branches ;
  57. next     1.12;
  58.  
  59. 1.12
  60. date     88.12.28.14.47.31;  author ouster;  state Exp;
  61. branches ;
  62. next     1.11;
  63.  
  64. 1.11
  65. date     88.12.04.13.53.33;  author ouster;  state Exp;
  66. branches ;
  67. next     1.10;
  68.  
  69. 1.10
  70. date     88.11.23.17.28.06;  author ouster;  state Exp;
  71. branches ;
  72. next     1.9;
  73.  
  74. 1.9
  75. date     88.11.23.09.52.01;  author ouster;  state Exp;
  76. branches ;
  77. next     1.8;
  78.  
  79. 1.8
  80. date     88.08.13.11.23.15;  author ouster;  state Exp;
  81. branches ;
  82. next     1.7;
  83.  
  84. 1.7
  85. date     88.08.12.21.35.43;  author ouster;  state Exp;
  86. branches ;
  87. next     1.6;
  88.  
  89. 1.6
  90. date     88.08.12.21.29.40;  author ouster;  state Exp;
  91. branches ;
  92. next     1.5;
  93.  
  94. 1.5
  95. date     88.08.12.16.36.13;  author ouster;  state Exp;
  96. branches ;
  97. next     1.4;
  98.  
  99. 1.4
  100. date     88.08.12.10.56.19;  author ouster;  state Exp;
  101. branches ;
  102. next     1.3;
  103.  
  104. 1.3
  105. date     88.07.27.17.45.19;  author ouster;  state Exp;
  106. branches ;
  107. next     1.2;
  108.  
  109. 1.2
  110. date     88.06.21.10.02.02;  author ouster;  state Exp;
  111. branches ;
  112. next     1.1;
  113.  
  114. 1.1
  115. date     88.06.05.13.57.29;  author ouster;  state Exp;
  116. branches ;
  117. next     ;
  118.  
  119.  
  120. desc
  121. @@
  122.  
  123.  
  124. 1.22
  125. log
  126. @added update and snapshot targets
  127. @
  128. text
  129. @#
  130. # This is a library Makefile that is included by the Makefiles for
  131. # top-level directories.  This file just arranges for a variety of
  132. # targets to be passed on to each of a collection of subdirectories.
  133. # The file that includes this one should already have defined the
  134. # following variables:
  135. #    SUBDIRS        Subdirectories that contain "interesting" things
  136. #            (e.g., individual commands, modules of the kernel,
  137. #            of sub-portions of a large library).
  138. #
  139. # A bunch of variables are passed on to lower-level makes, if they are
  140. # defined;  see the definitions immediately below for a complete list.
  141. #    
  142. # $Header: /sprite/lib/pmake/RCS/top.mk,v 1.21 91/09/24 17:47:09 jhh Exp $
  143. #
  144.  
  145. #
  146. # System programs -- assign conditionally so they may be redefined in
  147. # including makefile
  148. #
  149. BINDIR        ?= /sprite/cmds.$(MACHINE)
  150.  
  151. CAT        ?= $(BINDIR)/cat
  152. CP        ?= $(BINDIR)/cp
  153. MV        ?= $(BINDIR)/mv
  154. RM        ?= $(BINDIR)/rm
  155. TEST            ?= $(BINDIR)/test
  156. UPDATE        ?= $(BINDIR)/update
  157.  
  158. #
  159. # Figure out what stuff we'll pass to sub-makes.
  160. #
  161. PASSVARS    =
  162. #ifdef        CC
  163. PASSVARS    += 'CC=$(CC)'
  164. #endif
  165. #ifdef        XCFLAGS
  166. PASSVARS    += 'XCFLAGS=$(XCFLAGS)'
  167. #endif
  168. #ifdef        XAFLAGS
  169. PASSVARS    += 'XAFLAGS=$(XAFLAGS)'
  170. #endif
  171. #ifdef        INCLUDEDIR
  172. PASSVARS    += 'INCLUDEDIR=$(INCLUDEDIR)'
  173. #endif
  174. #ifdef        INSTALLDIR
  175. PASSVARS    += 'INSTALLDIR=$(INSTALLDIR)'
  176. #endif
  177. #ifdef        NOBACKUP
  178. PASSVARS    += 'NOBACKUP=$(NOBACKUP)'
  179. #endif
  180. #ifdef        BACKUPAGE
  181. PASSVARS    += 'BACKUPAGE=$(BACKUPAGE)'
  182. #endif
  183. #ifdef        TM
  184. PASSVARS    += 'TM=$(TM)'
  185. #endif
  186.  
  187. # MAKESUBDIRS usage:
  188. #    <target> : MAKESUBDIRS
  189. #
  190. # This .USE target will simply pass <target> onto each subdirectory
  191. # in a separate make.  If the TM variable is defined, then only pass
  192. # the target on to subdirectories whose Makefiles include the given
  193. # TM among their MACHINES.
  194. #
  195. MAKESUBDIRS    : .USE .MAKE .SILENT .NOEXPORT
  196.     for i in $(SUBDIRS);
  197.     do
  198. #ifdef TM
  199.         if grep '^MACHINES' $i/Makefile | grep -s $(TM); then
  200.             true;
  201.         else continue;
  202.         fi
  203. #endif TM
  204.         echo %%% ${i} %%%
  205.         (cd $i; $(MAKE) $(PASSVARS) $(.TARGET))
  206.     done
  207.  
  208. default        : $(SUBDIRS) .NOEXPORT
  209.  
  210. #
  211. # Here as with MAKESUBDIRS, if an explicit TM is given then only
  212. # re-make in the subdirectories that support that particular target
  213. # machine.
  214. #
  215. $(SUBDIRS)    :: .SILENT .NOEXPORT
  216. #ifdef TM
  217.     if grep '^MACHINES' $(.TARGET)/Makefile | grep -s $(TM); then
  218.         (cd $(.TARGET); $(MAKE) $(PASSVARS))
  219.     else true;
  220.     fi
  221. #else
  222.     (cd $(.TARGET); $(MAKE) $(PASSVARS))
  223. #endif
  224.  
  225. clean        :: .NOEXPORT
  226.     rm -f *~
  227.  
  228. mkmf        ! .MAKE .SILENT .NOEXPORT
  229.     mkmf
  230.     for i in $(SUBDIRS);
  231.     do
  232.         echo  %%% ${i} %%%
  233.         (cd $i; $(MAKE) mkmf)
  234.     done
  235.  
  236. newtm        ! .MAKE .SILENT .NOEXPORT
  237.     for i in $(SUBDIRS);
  238.     do
  239.         echo %%% ${i} %%%
  240.         (cd $i; $(MAKE) $(PASSVARS) newtm)
  241.     done
  242.  
  243. rcsinfo        : .MAKE .SILENT .NOEXPORT
  244.     for i in $(SUBDIRS);
  245.     do
  246.         echo %%% ${i} %%%
  247.         (cd $i; rcsinfo)
  248.     done
  249.  
  250. dist ::   subdirs_d
  251. #if defined(DISTDIR) && !empty(DISTDIR)
  252.     for i in Makefile local.mk
  253.     do
  254.     if $(TEST) -e $${i};
  255.         then $(UPDATE)  $${i} $(DISTDIR)/$${i} ; else true; fi
  256.     done
  257. #endif
  258.  
  259. subdirs_d:
  260.     for i in $(SUBDIRS)
  261.     do
  262.         echo %%% $${i} %%%
  263. #if defined(DISTDIR) && !empty(DISTDIR)
  264. #ifdef TM
  265.         ( cd $${i}; $(MAKE) dist 'DISTDIR=$(DISTDIR)'/$${i} 'TM=$(TM)' )
  266. #else
  267.         ( cd $${i}; $(MAKE) dist 'DISTDIR=$(DISTDIR)'/$${i} )
  268. #endif
  269. #else
  270. #ifdef TM
  271.         ( cd $${i}; $(MAKE) dist 'TM=$(TM)' )
  272. #else
  273.         ( cd $${i}; $(MAKE) dist )
  274. #endif
  275. #endif
  276.     done
  277.  
  278. all clean tidy cleanall            :: MAKESUBDIRS
  279. debug depend dependall install        :: MAKESUBDIRS
  280. installhdrs installdebug installman    :: MAKESUBDIRS
  281. installprofile lint profile rdist    :: MAKESUBDIRS
  282. tags TAGS update snapshot        :: MAKESUBDIRS
  283.  
  284. .MAKEFLAGS    : -C        # No compatibility needed
  285. @
  286.  
  287.  
  288. 1.21
  289. log
  290. @added cleanall
  291. @
  292. text
  293. @d14 1
  294. a14 1
  295. # $Header: /sprite/lib/pmake/RCS/top.mk,v 1.20 90/11/08 21:01:12 jhh Exp $
  296. d154 1
  297. a154 1
  298. tags TAGS                :: MAKESUBDIRS
  299. @
  300.  
  301.  
  302. 1.20
  303. log
  304. @added the dependall target
  305. @
  306. text
  307. @d14 1
  308. a14 1
  309. # $Header: /sprite/lib/pmake/RCS/top.mk,v 1.19 90/07/30 15:42:47 rab Exp Locker: jhh $
  310. d150 1
  311. a150 1
  312. all clean tidy                 :: MAKESUBDIRS
  313. @
  314.  
  315.  
  316. 1.19
  317. log
  318. @Changed : to :: for dist rule.
  319. @
  320. text
  321. @d14 1
  322. a14 1
  323. # $Header: /sprite/lib/pmake/RCS/top.mk,v 1.18 90/03/08 16:51:14 douglis Exp Locker: rab $
  324. d151 1
  325. a151 1
  326. debug depend install             :: MAKESUBDIRS
  327. @
  328.  
  329.  
  330. 1.18
  331. log
  332. @handle recursive makes of TAGS file.
  333. @
  334. text
  335. @d14 1
  336. a14 1
  337. # $Header: /sprite/lib/pmake/RCS/top.mk,v 1.17 90/02/27 17:42:54 douglis Exp Locker: douglis $
  338. d122 1
  339. a122 1
  340. dist:   subdirs_d
  341. @
  342.  
  343.  
  344. 1.17
  345. log
  346. @added support for backup age flag BACKUPAGE
  347. @
  348. text
  349. @d14 1
  350. a14 1
  351. # $Header: /sprite/lib/pmake/RCS/top.mk,v 1.16 89/10/09 06:55:28 rab Exp Locker: douglis $
  352. d154 1
  353. @
  354.  
  355.  
  356. 1.16
  357. log
  358. @Fixed distribution stuff.
  359. @
  360. text
  361. @d14 1
  362. a14 1
  363. # $Header: /sprite/lib/pmake/RCS/top.mk,v 1.15 89/04/03 22:23:15 douglis Exp Locker: rab $
  364. d51 3
  365. @
  366.  
  367.  
  368. 1.15
  369. log
  370. @added 'tidy' target.
  371. @
  372. text
  373. @d14 1
  374. a14 1
  375. # $Header: /sprite/lib/pmake/RCS/top.mk,v 1.14 89/01/13 09:35:53 douglis Exp Locker: douglis $
  376. d18 13
  377. d117 28
  378. @
  379.  
  380.  
  381. 1.14
  382. log
  383. @more .NOEXPORT changes.
  384. @
  385. text
  386. @d14 1
  387. a14 1
  388. # $Header: /sprite/lib/pmake/RCS/top.mk,v 1.13 89/01/09 22:33:34 douglis Exp Locker: douglis $
  389. d106 2
  390. a107 1
  391. all clean debug depend install         :: MAKESUBDIRS
  392. @
  393.  
  394.  
  395. 1.13
  396. log
  397. @don't export top level makes.
  398. @
  399. text
  400. @d14 1
  401. a14 1
  402. # $Header: /sprite/lib/pmake/RCS/top.mk,v 1.12 88/12/28 14:47:31 ouster Exp Locker: douglis $
  403. d64 1
  404. a64 1
  405. default        : $(SUBDIRS)
  406. d71 1
  407. a71 1
  408. $(SUBDIRS)    :: .SILENT
  409. d84 1
  410. a84 1
  411. mkmf        ! .MAKE .SILENT
  412. d92 1
  413. a92 1
  414. newtm        ! .MAKE .SILENT
  415. d99 1
  416. a99 1
  417. rcsinfo        : .MAKE .SILENT
  418. @
  419.  
  420.  
  421. 1.12
  422. log
  423. @Added "installman" target.
  424. @
  425. text
  426. @d14 1
  427. a14 1
  428. # $Header: /sprite/lib/pmake/RCS/top.mk,v 1.11 88/12/04 13:53:33 ouster Exp $
  429. d51 1
  430. a51 1
  431. MAKESUBDIRS    : .USE .MAKE .SILENT
  432. @
  433.  
  434.  
  435. 1.11
  436. log
  437. @Added "all" target.
  438. @
  439. text
  440. @d14 1
  441. a14 1
  442. # $Header: /sprite/lib/pmake/RCS/top.mk,v 1.10 88/11/23 17:28:06 ouster Exp $
  443. d107 1
  444. a107 1
  445. installhdrs installdebug        :: MAKESUBDIRS
  446. @
  447.  
  448.  
  449. 1.10
  450. log
  451. @Revisions to make "make newtm" work.
  452. @
  453. text
  454. @d14 1
  455. a14 1
  456. # $Header: /sprite/lib/pmake/RCS/top.mk,v 1.9 88/11/23 09:52:01 ouster Exp $
  457. d106 3
  458. a108 3
  459. clean debug depend install installhdrs     :: MAKESUBDIRS
  460. installdebug installprofile        :: MAKESUBDIRS
  461. lint profile rdist            :: MAKESUBDIRS
  462. @
  463.  
  464.  
  465. 1.9
  466. log
  467. @Major changes to finalize the new C library (move include.new to
  468. include, etc.).
  469. @
  470. text
  471. @d14 1
  472. a14 1
  473. # $Header: top.mk,v 1.8 88/08/13 11:23:15 ouster Exp $
  474. d74 1
  475. a74 1
  476.         cd $(.TARGET); $(MAKE) $(PASSVARS)
  477. d78 1
  478. a78 1
  479.     cd $(.TARGET); $(MAKE) $(PASSVARS)
  480. d89 1
  481. a89 1
  482.         (cd $i; make mkmf)
  483. d92 7
  484. d108 1
  485. a108 1
  486. lint newtm profile rdist        :: MAKESUBDIRS
  487. @
  488.  
  489.  
  490. 1.8
  491. log
  492. @Don't ignore errors:  too hard to find them later.
  493. @
  494. text
  495. @d14 1
  496. a14 1
  497. # $Header: top.mk,v 1.7 88/08/12 21:35:43 ouster Exp $
  498. d47 4
  499. a50 1
  500. # in a separate make.
  501. d54 6
  502. d65 13
  503. a77 1
  504. $(SUBDIRS)    ::
  505. d79 1
  506. d81 5
  507. a85 1
  508. mkmf        : .MAKE .SILENT
  509. d89 1
  510. a89 1
  511.         (cd $i; mkmf)
  512. a91 7
  513. newtarget    : .MAKE .SILENT
  514.     for i in $(SUBDIRS);
  515.     do
  516.         echo %%% ${i} %%%
  517.         (cd $i; mkdir $(TM).md)
  518.     done
  519.  
  520. d101 1
  521. a101 1
  522. lint profile rdist            :: MAKESUBDIRS
  523. @
  524.  
  525.  
  526. 1.7
  527. log
  528. @Added "debug" target.
  529. @
  530. text
  531. @d14 1
  532. a14 1
  533. # $Header: top.mk,v 1.6 88/08/12 21:29:40 ouster Exp $
  534. d48 1
  535. a48 1
  536. MAKESUBDIRS    : .USE .IGNORE .MAKE .SILENT
  537. d66 1
  538. a66 1
  539. newtarget    : .MAKE .IGNORE .SILENT
  540. d73 1
  541. a73 1
  542. rcsinfo        : .MAKE .IGNORE .SILENT
  543. @
  544.  
  545.  
  546. 1.6
  547. log
  548. @Rename "all" to "default" to avoid conflict with all.mk's target.
  549. @
  550. text
  551. @d14 1
  552. a14 1
  553. # $Header: top.mk,v 1.5 88/08/12 16:36:13 ouster Exp $
  554. d80 1
  555. a80 1
  556. clean depend install installhdrs     :: MAKESUBDIRS
  557. @
  558.  
  559.  
  560. 1.5
  561. log
  562. @Added installdebug and installprofile.
  563. @
  564. text
  565. @d14 1
  566. a14 1
  567. # $Header: top.mk,v 1.4 88/08/12 10:56:19 ouster Exp $
  568. d55 1
  569. a55 1
  570. all        : $(SUBDIRS)
  571. @
  572.  
  573.  
  574. 1.4
  575. log
  576. @Changed CCFLAGS -> XCFLAGS, CAFLAGS -> XAFLAGS.
  577. @
  578. text
  579. @d14 1
  580. a14 1
  581. # $Header: top.mk,v 1.3 88/07/27 17:45:19 ouster Exp $
  582. d81 1
  583. @
  584.  
  585.  
  586. 1.3
  587. log
  588. @Added rcsinfo target.
  589. @
  590. text
  591. @d14 1
  592. a14 1
  593. # $Header: top.mk,v 1.2 88/06/21 10:02:02 ouster Exp $
  594. d24 2
  595. a25 2
  596. #ifdef        CCFLAGS
  597. PASSVARS    += 'CCFLAGS=$(CCFLAGS)'
  598. d27 2
  599. a28 2
  600. #ifdef        CAFLAGS
  601. PASSVARS    += 'CAFLAGS=$(CAFLAGS)'
  602. @
  603.  
  604.  
  605. 1.2
  606. log
  607. @Make output prettier.
  608. @
  609. text
  610. @d14 1
  611. a14 1
  612. # $Header: top.mk,v 1.1 88/06/05 13:57:29 ouster Exp $
  613. d71 7
  614. @
  615.  
  616.  
  617. 1.1
  618. log
  619. @Initial revision
  620. @
  621. text
  622. @d14 1
  623. a14 1
  624. # $Header: command2.mk,v 1.4 88/06/05 11:48:40 ouster Exp $
  625. d51 1
  626. a51 1
  627.         echo ${i}:
  628. d62 1
  629. a62 1
  630.         echo ${i}:
  631. d69 1
  632. a69 1
  633.         echo ${i}:
  634. @
  635.